function onButtonMotion (f, evt, ax, p1, l)

  p2 = get (ax, 'CurrentPoint');
  p2 = p2(1,1:2);

  set (l, 'XData', [p1(1), p2(1)], 'YData', [p1(2), p2(2)]);
  drawnow;

end
